/**
 * Created by likezhen on 2017/5/4.
 */
import Mock from 'mockjs';
var Random = Mock.Random;

var goupList = Mock.mock(/group\/list/, {
    'data': {
        'groupInfos': [{
            'deviceCnt|60-200': 80,
            'onlineCnt|1-40': 20,
            'groupId': '718047825774684635',
            'groupName': '设备组1',
            'note': Random.csentence(10, 20)
        },{
            'deviceCnt|60-200': 80,
            'onlineCnt|1-40': 20,
            'groupId': '718047825774684630',
            'groupName': '设备组2',
            'note': Random.csentence(10, 20)
        },{
            'deviceCnt|60-200': 80,
            'onlineCnt|1-40': 20,
            'groupId': '0',
            'groupName': '未分组设备',
            'note': Random.csentence(10, 20)
        }]
    }
})

var devList = Mock.mock(/group\/deviceList/, {
    'data': {
        'totalCnt': 4,
        'onlineCnt':2,
        'devInfos': [{
            'devId': Random.string( 'number', 18),
            'devName': Random.cword(3, 5),
            'devSn': '',
            'devType|1': ['1', '2'],
            'accessTime': Random.date('yyyyMMddHHmmss'),
            'devStatus': '2',
            'devStorageStat': 'cloud_off',
            'shareTime': Random.date('yyyyMMddHHmmss'),
            'note': Random.csentence(10, 20),
            'authFlg': '1111',
            'ownerFlg': '',
            'devGroupId': '',
            'shareFlg': '',
            'thumbnailUrl': Random.image('400x225', '#00405d', '#fff', 'Mock')
        },{
            'devId': Random.string( 'number', 18),
            'devName': Random.cword(3, 5),
            'devSn': '',
            'devType|1': ['1', '2'],
            'accessTime': Random.date('yyyyMMddHHmmss'),
            'devStatus': '2',
            'devStorageStat': 'cloud_on',
            'shareTime': Random.date('yyyyMMddHHmmss'),
            'note': Random.csentence(10, 20),
            'authFlg': '1111',
            'ownerFlg': '',
            'devGroupId': '',
            'shareFlg': '',
            'thumbnailUrl': ''
        },{
            'devId': Random.string( 'number', 18),
            'devName': Random.cword(3, 5),
            'devSn': '',
            'devType|1': ['1', '2'],
            'accessTime': Random.date('yyyyMMddHHmmss'),
            'devStatus': '1',
            'devStorageStat': 'cloud_on',
            'shareTime': Random.date('yyyyMMddHHmmss'),
            'note': Random.csentence(10, 20),
            'authFlg': '0000',
            'ownerFlg': '',
            'devGroupId': '',
            'shareFlg': '',
            'thumbnailUrl': Random.image('400x225', '#00405d', '#fff', 'Mock')
        },{
            'devId': Random.string( 'number', 18),
            'devName': Random.cword(3, 5),
            'devSn': '',
            'devType|1': ['1', '2'],
            'accessTime': Random.date('yyyyMMddHHmmss'),
            'devStatus': '0',
            'devStorageStat': 'cloud_off',
            'shareTime': Random.date('yyyyMMddHHmmss'),
            'note': Random.csentence(10, 20),
            'authFlg': '1111',
            'ownerFlg': '',
            'devGroupId': '',
            'shareFlg': '',
            'thumbnailUrl': Random.image('400x225', '#00405d', '#fff', 'Mock')
        }]
    }
})

var shareDevList = Mock.mock(/group\/receiveDeviceList/, {
    'data': {
        'totalCnt':0,
        'onlineCnt':0,
        'devInfos': []
    }
})

var liveInfo = Mock.mock(/videos\/liveInfo/, {
    'data': {
        'liveStreamSta':'1',
        'liveUrl':''
    }
})
var devCtrl = Mock.mock(/videos\/devCtrl/, {
    'data': {
        'errorCode':'000000',
        'errorDesc':'成功',
        'locate':'../../images/videoCloud/default.jpg'
    }
})

export {goupList, devList, shareDevList, liveInfo, devCtrl}
